package com.shenyi.wx.dao;

import com.shenyi.core.globalDao.BaseDao;
import com.shenyi.wx.entity.SmsLogDO;
import com.shenyi.wx.entity.UserDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


@Mapper
public interface ApiUserMapper extends BaseDao<UserDO> {

    UserDO queryByMobile(String mobile);

    UserDO queryByOpenId(@Param("openId") String openId);

    /**
     * 获取用户最后一条短信
     *
     * @param user_id
     * @return`
     */
    SmsLogDO querySmsCodeByUserId(@Param("user_id") Long user_id);

    /**
     * 保存短信
     *
     * @param smsLogDO
     * @return
     */
    int saveSmsCodeLog(SmsLogDO smsLogDO);
}
